package cn.vivi.design.combination;

public abstract class MenuComponent {
    protected String name;

    protected int level;

    public void add(MenuComponent component) {
        throw new UnsupportedOperationException();
    }

    public void remove(MenuComponent component) {
        throw new UnsupportedOperationException();
    }

    public MenuComponent getChild(int index) {
        throw new UnsupportedOperationException();
    }

    public String getName() {
        return this.name;
    }

    public abstract void print();
}
